/*
* Copyright (C) 2012-2013, <Aeihu.z, aeihu.z@gmail.com>.
*
* Game Scenario Maker is a free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Version 2(GPLv2) as published by the Free Software Foundation.
*/

//#include "CAnimationBank.h"
//#include <iostream>
//
//using namespace std;
//
//CAnimationBank        CAnimationBank::animationbank;
//
//void CAnimationBank::OnLoop()
//{
//    for (int i = Animation_Running.size() - 1; i >= 0; i--)
//    {
//        animationbank.AnimationList[Animation_Running[i]].OnLoop();
//
//        if (!animationbank.AnimationList[Animation_Running[i]].Running)
//            Animation_Running.erase(Animation_Running.begin() + i);
//    }
//}
//
//void CAnimationBank::OnRender(SDL_Surface* Surf_Dest)
//{
//    for (int i = Animation_Running.size() - 1; i >= 0; i--)
//    {
//        animationbank.AnimationList[Animation_Running[i]].OnRender(Surf_Dest);
//    }
//}
//
//void CAnimationBank::OnCleanup()
//{
//    map<string, CAnimationScript>::iterator it;
//
//    for ( it=AnimationList.begin() ; it != AnimationList.end(); it++ )
//    {
//        (*it).second.OnCleanup();
//    }
//
//    AnimationList.clear();
//}
//
//int CAnimationBank::PlayAnime(string name, int x, int y)
//{
//    if (AnimationList.count(name) < 1)
//    {
//        return -2;
//    }
//
//    switch (AnimationList[name].Start(x, y))
//    {
//        case -1:
//            return -1;
//        break;
//        case 0:
//            return 0;
//        break;
//    }
//
//    Animation_Running.push_back(name);
//    return 1;
//}